<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>Priithon.Mrc</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="Priithon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://code.google.com/p/priithon">Priithon</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        <a href="Priithon-module.html">Package&nbsp;Priithon</a> ::
        Module&nbsp;Mrc
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="Priithon.Mrc-module.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== MODULE DESCRIPTION ==================== -->
<h1 class="epydoc">Module Mrc</h1><p class="nomargin-top"><span class="codelink"><a href="Priithon.Mrc-pysrc.html">source&nbsp;code</a></span></p>
<p>MRC file format: refer to 
  http://www.msg.ucsf.edu/IVE/IVE4_HTML/IM_ref2.html</p>
  <p>Mrc class uses memory mapping (file size limit about 1GB (more or 
  less) Mrc2 class section wise file/array I/O</p>

<hr />
<div class="fields">      <p><strong>Author:</strong>
        Sebastian Haase &lt;seb.haase+Priithon@gmail.com&gt;
      </p>
      <p><strong>License:</strong>
        BSD license - see LICENSE file
      </p>
</div><!-- ==================== CLASSES ==================== -->
<a name="section-Classes"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Classes</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Classes"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="Priithon.Mrc.ndarray_inMrcFile-class.html" class="summary-name">ndarray_inMrcFile</a>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="Priithon.Mrc.Mrc-class.html" class="summary-name">Mrc</a>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="Priithon.Mrc.Mrc2-class.html" class="summary-name">Mrc2</a><br />
      this class is for NON-memmapped access of Mrc files
sections can be read and written on a by-need basis
the Mrc2 object itself only handles
   the file-object and
   the header and
   extended header data
   BUT NOT ANY image data
    </td>
  </tr>
</table>
<!-- ==================== FUNCTIONS ==================== -->
<a name="section-Functions"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Functions</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Functions"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="Priithon.Mrc-module.html#bindFile" class="summary-sig-name">bindFile</a>(<span class="summary-sig-arg">fn</span>,
        <span class="summary-sig-arg">writable</span>=<span class="summary-sig-default">0</span>)</span><br />
      open existing Mrc file</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="Priithon.Mrc-pysrc.html#bindFile">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="open"></a><span class="summary-sig-name">open</span>(<span class="summary-sig-arg">path</span>,
        <span class="summary-sig-arg">mode</span>=<span class="summary-sig-default"><code class="variable-quote">'</code><code class="variable-string">r</code><code class="variable-quote">'</code></span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="Priithon.Mrc-pysrc.html#open">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="load"></a><span class="summary-sig-name">load</span>(<span class="summary-sig-arg">fn</span>)</span><br />
      return 3D array filled with the data (non memmap)</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="Priithon.Mrc-pysrc.html#load">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="Priithon.Mrc-module.html#save" class="summary-sig-name">save</a>(<span class="summary-sig-arg">a</span>,
        <span class="summary-sig-arg">fn</span>,
        <span class="summary-sig-arg">ifExists</span>=<span class="summary-sig-default"><code class="variable-quote">'</code><code class="variable-string">ask</code><code class="variable-quote">'</code></span>,
        <span class="summary-sig-arg">zAxisOrder</span>=<span class="summary-sig-default">None</span>,
        <span class="summary-sig-arg">hdr</span>=<span class="summary-sig-default">None</span>,
        <span class="summary-sig-arg">hdrEval</span>=<span class="summary-sig-default"><code class="variable-quote">'</code><code class="variable-string"></code><code class="variable-quote">'</code></span>,
        <span class="summary-sig-arg">calcMMM</span>=<span class="summary-sig-default">True</span>,
        <span class="summary-sig-arg">extInts</span>=<span class="summary-sig-default">None</span>,
        <span class="summary-sig-arg">extFloats</span>=<span class="summary-sig-default">None</span>)</span><br />
      ifExists shoud be one of
   ask
   raise
   overwrite
   skip</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="Priithon.Mrc-pysrc.html#save">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="minExtHdrSize"></a><span class="summary-sig-name">minExtHdrSize</span>(<span class="summary-sig-arg">nSecs</span>,
        <span class="summary-sig-arg">bytesPerSec</span>)</span><br />
      return smallest multiple of 1024 to fit extHdr data</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="Priithon.Mrc-pysrc.html#minExtHdrSize">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="MrcMode2dtype"></a><span class="summary-sig-name">MrcMode2dtype</span>(<span class="summary-sig-arg">mode</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="Priithon.Mrc-pysrc.html#MrcMode2dtype">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="dtype2MrcMode"></a><span class="summary-sig-name">dtype2MrcMode</span>(<span class="summary-sig-arg">dtype</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="Priithon.Mrc-pysrc.html#dtype2MrcMode">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="Priithon.Mrc-module.html#shapeFromHdr" class="summary-sig-name">shapeFromHdr</a>(<span class="summary-sig-arg">hdr</span>,
        <span class="summary-sig-arg">verbose</span>=<span class="summary-sig-default">0</span>)</span><br />
      return &quot;smart&quot; shape  
considering numTimes, numWavelenth and hdr.ImgSequence</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="Priithon.Mrc-pysrc.html#shapeFromHdr">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="implement_hdr"></a><span class="summary-sig-name">implement_hdr</span>(<span class="summary-sig-arg">hdrArray</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="Priithon.Mrc-pysrc.html#implement_hdr">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="makeHdrArray"></a><span class="summary-sig-name">makeHdrArray</span>(<span class="summary-sig-arg">buffer</span>=<span class="summary-sig-default">None</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="Priithon.Mrc-pysrc.html#makeHdrArray">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="hdrInfo"></a><span class="summary-sig-name">hdrInfo</span>(<span class="summary-sig-arg">hdr</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="Priithon.Mrc-pysrc.html#hdrInfo">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="Priithon.Mrc-module.html#axisOrderStr" class="summary-sig-name">axisOrderStr</a>(<span class="summary-sig-arg">hdr</span>,
        <span class="summary-sig-arg">onlyLetters</span>=<span class="summary-sig-default">True</span>)</span><br />
      return string indicating meaning of shape dimensions ## ## wtz   
      &lt;- non-interleaved ## tzw   &lt;- OM1 ( easy on stage) ## twz   
      &lt;- added by API (used at all ??) ## ^ ## | ## +--- first letter 
      'fastest'</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="Priithon.Mrc-pysrc.html#axisOrderStr">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="init_simple"></a><span class="summary-sig-name">init_simple</span>(<span class="summary-sig-arg">hdr</span>,
        <span class="summary-sig-arg">mode</span>,
        <span class="summary-sig-arg">nxOrShape</span>,
        <span class="summary-sig-arg">ny</span>=<span class="summary-sig-default">None</span>,
        <span class="summary-sig-arg">nz</span>=<span class="summary-sig-default">None</span>)</span><br />
      note: if  nxOrShape is tuple it is nz,ny,nx (note the order!!)</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="Priithon.Mrc-pysrc.html#init_simple">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="initHdrArrayFrom"></a><span class="summary-sig-name">initHdrArrayFrom</span>(<span class="summary-sig-arg">hdrDest</span>,
        <span class="summary-sig-arg">hdrSrc</span>)</span><br />
      copy all field of the header EXCEPT  shape AND PixelType AND all 
      fields related to extended hdr</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="Priithon.Mrc-pysrc.html#initHdrArrayFrom">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="setTitle"></a><span class="summary-sig-name">setTitle</span>(<span class="summary-sig-arg">hdr</span>,
        <span class="summary-sig-arg">s</span>,
        <span class="summary-sig-arg">i</span>=<span class="summary-sig-default">-1</span>)</span><br />
      set title i (i==-1 means &quot;append&quot;) to s</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="Priithon.Mrc-pysrc.html#setTitle">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
</table>
<!-- ==================== VARIABLES ==================== -->
<a name="section-Variables"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Variables</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Variables"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="Priithon.Mrc-module.html#mrcHdrNames" class="summary-name">mrcHdrNames</a> = <code title="['Num',
 'PixelType',
 'mst',
 'm',
 'd',
 'angle',
 'axis',
 'mmm1',
..."><code class="variable-group">[</code><code class="variable-quote">'</code><code class="variable-string">Num</code><code class="variable-quote">'</code><code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-string">PixelType</code><code class="variable-quote">'</code><code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-string">mst</code><code class="variable-quote">'</code><code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-string">m</code><code class="variable-quote">'</code><code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-string">d</code><code class="variable-quote">'</code><code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-string">angle</code><code class="variable-quote">'</code><code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-ellipsis">...</code></code>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="Priithon.Mrc-module.html#mrcHdrFormats" class="summary-name">mrcHdrFormats</a> = <code title="['3i4',
 '1i4',
 '3i4',
 '3i4',
 '3f4',
 '3f4',
 '3i4',
 '3f4',
..."><code class="variable-group">[</code><code class="variable-quote">'</code><code class="variable-string">3i4</code><code class="variable-quote">'</code><code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-string">1i4</code><code class="variable-quote">'</code><code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-string">3i4</code><code class="variable-quote">'</code><code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-string">3i4</code><code class="variable-quote">'</code><code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-string">3f4</code><code class="variable-quote">'</code><code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-string">3f4</code><code class="variable-quote">'</code><code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-string">3i</code><code class="variable-ellipsis">...</code></code>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="Priithon.Mrc-module.html#mrcHdr_dtype" class="summary-name">mrcHdr_dtype</a> = <code title="[('Num', '3i4'),
 ('PixelType', '1i4'),
 ('mst', '3i4'),
 ('m', '3i4'),
 ('d', '3f4'),
 ('angle', '3f4'),
 ('axis', '3i4'),
 ('mmm1', '3f4'),
..."><code class="variable-group">[</code><code class="variable-group">(</code><code class="variable-quote">'</code><code class="variable-string">Num</code><code class="variable-quote">'</code><code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-string">3i4</code><code class="variable-quote">'</code><code class="variable-group">)</code><code class="variable-op">, </code><code class="variable-group">(</code><code class="variable-quote">'</code><code class="variable-string">PixelType</code><code class="variable-quote">'</code><code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-string">1i4</code><code class="variable-quote">'</code><code class="variable-group">)</code><code class="variable-op">, </code><code class="variable-group">(</code><code class="variable-quote">'</code><code class="variable-string">mst</code><code class="variable-quote">'</code><code class="variable-op">, </code><code class="variable-ellipsis">...</code></code>
    </td>
  </tr>
</table>
<!-- ==================== FUNCTION DETAILS ==================== -->
<a name="section-FunctionDetails"></a>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Function Details</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-FunctionDetails"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
</table>
<a name="bindFile"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">bindFile</span>(<span class="sig-arg">fn</span>,
        <span class="sig-arg">writable</span>=<span class="sig-default">0</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="Priithon.Mrc-pysrc.html#bindFile">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  <p>open existing Mrc file</p>
  <p>returns memmaped array array has special 'Mrc' attribute</p>
  <dl class="fields">
  </dl>
</td></tr></table>
</div>
<a name="save"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">save</span>(<span class="sig-arg">a</span>,
        <span class="sig-arg">fn</span>,
        <span class="sig-arg">ifExists</span>=<span class="sig-default"><code class="variable-quote">'</code><code class="variable-string">ask</code><code class="variable-quote">'</code></span>,
        <span class="sig-arg">zAxisOrder</span>=<span class="sig-default">None</span>,
        <span class="sig-arg">hdr</span>=<span class="sig-default">None</span>,
        <span class="sig-arg">hdrEval</span>=<span class="sig-default"><code class="variable-quote">'</code><code class="variable-string"></code><code class="variable-quote">'</code></span>,
        <span class="sig-arg">calcMMM</span>=<span class="sig-default">True</span>,
        <span class="sig-arg">extInts</span>=<span class="sig-default">None</span>,
        <span class="sig-arg">extFloats</span>=<span class="sig-default">None</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="Priithon.Mrc-pysrc.html#save">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  <pre class="literalblock">

ifExists shoud be one of
   ask
   raise
   overwrite
   skip

(only first letter is checked)

 use zAxisOrder if arr.ndim &gt; 3:
   zAxisOrder is given in order conform to python(last is fastest)
      (spaces,commas,dots,minuses  are ignored)
   examples:
      4D: time,z,y,x          --&gt;  zAxisOrder= 't z'
      5D: time, wave, z,y,x   --&gt;  zAxisOrder= 't,z,w'
   refer to Mrc spec 'ImgSequence' (interleaved or not)
   zAxisOrder None means:
      3D: 'z'
      4D: 'tz'
      5D: 'tzw'

if hdr is not None:  copy all fields(except 'Num',...)
if calcMMM:  calculate min,max,mean of data set and set hdr field
if hdrEval:  exec this string (&quot;hdr&quot; refers to the 'new' header)

TODO: not implemented yet, extInts=None, extFloats=None

</pre>
  <dl class="fields">
  </dl>
</td></tr></table>
</div>
<a name="shapeFromHdr"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">shapeFromHdr</span>(<span class="sig-arg">hdr</span>,
        <span class="sig-arg">verbose</span>=<span class="sig-default">0</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="Priithon.Mrc-pysrc.html#shapeFromHdr">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  <pre class="literalblock">

return &quot;smart&quot; shape  
considering numTimes, numWavelenth and hdr.ImgSequence

if verbose:
    print somthing like: w,t,z,y,x  ot z,y,x

</pre>
  <dl class="fields">
  </dl>
</td></tr></table>
</div>
<a name="axisOrderStr"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">axisOrderStr</span>(<span class="sig-arg">hdr</span>,
        <span class="sig-arg">onlyLetters</span>=<span class="sig-default">True</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="Priithon.Mrc-pysrc.html#axisOrderStr">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  <p>return string indicating meaning of shape dimensions ## ## wtz   &lt;-
  non-interleaved ## tzw   &lt;- OM1 ( easy on stage) ## twz   &lt;- added 
  by API (used at all ??) ## ^ ## | ## +--- first letter 'fastest'</p>
  <p>fixme: possibly wrong when doDataMap found bad file-size</p>
  <dl class="fields">
  </dl>
</td></tr></table>
</div>
<br />
<!-- ==================== VARIABLES DETAILS ==================== -->
<a name="section-VariablesDetails"></a>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Variables Details</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-VariablesDetails"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
</table>
<a name="mrcHdrNames"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <h3 class="epydoc">mrcHdrNames</h3>
  
  <dl class="fields">
  </dl>
  <dl class="fields">
    <dt>Value:</dt>
      <dd><table><tr><td><pre class="variable">
<code class="variable-group">[</code><code class="variable-quote">'</code><code class="variable-string">Num</code><code class="variable-quote">'</code><code class="variable-op">,</code>
 <code class="variable-quote">'</code><code class="variable-string">PixelType</code><code class="variable-quote">'</code><code class="variable-op">,</code>
 <code class="variable-quote">'</code><code class="variable-string">mst</code><code class="variable-quote">'</code><code class="variable-op">,</code>
 <code class="variable-quote">'</code><code class="variable-string">m</code><code class="variable-quote">'</code><code class="variable-op">,</code>
 <code class="variable-quote">'</code><code class="variable-string">d</code><code class="variable-quote">'</code><code class="variable-op">,</code>
 <code class="variable-quote">'</code><code class="variable-string">angle</code><code class="variable-quote">'</code><code class="variable-op">,</code>
 <code class="variable-quote">'</code><code class="variable-string">axis</code><code class="variable-quote">'</code><code class="variable-op">,</code>
 <code class="variable-quote">'</code><code class="variable-string">mmm1</code><code class="variable-quote">'</code><code class="variable-op">,</code>
<code class="variable-ellipsis">...</code>
</pre></td></tr></table>
</dd>
  </dl>
</td></tr></table>
</div>
<a name="mrcHdrFormats"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <h3 class="epydoc">mrcHdrFormats</h3>
  
  <dl class="fields">
  </dl>
  <dl class="fields">
    <dt>Value:</dt>
      <dd><table><tr><td><pre class="variable">
<code class="variable-group">[</code><code class="variable-quote">'</code><code class="variable-string">3i4</code><code class="variable-quote">'</code><code class="variable-op">,</code>
 <code class="variable-quote">'</code><code class="variable-string">1i4</code><code class="variable-quote">'</code><code class="variable-op">,</code>
 <code class="variable-quote">'</code><code class="variable-string">3i4</code><code class="variable-quote">'</code><code class="variable-op">,</code>
 <code class="variable-quote">'</code><code class="variable-string">3i4</code><code class="variable-quote">'</code><code class="variable-op">,</code>
 <code class="variable-quote">'</code><code class="variable-string">3f4</code><code class="variable-quote">'</code><code class="variable-op">,</code>
 <code class="variable-quote">'</code><code class="variable-string">3f4</code><code class="variable-quote">'</code><code class="variable-op">,</code>
 <code class="variable-quote">'</code><code class="variable-string">3i4</code><code class="variable-quote">'</code><code class="variable-op">,</code>
 <code class="variable-quote">'</code><code class="variable-string">3f4</code><code class="variable-quote">'</code><code class="variable-op">,</code>
<code class="variable-ellipsis">...</code>
</pre></td></tr></table>
</dd>
  </dl>
</td></tr></table>
</div>
<a name="mrcHdr_dtype"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <h3 class="epydoc">mrcHdr_dtype</h3>
  
  <dl class="fields">
  </dl>
  <dl class="fields">
    <dt>Value:</dt>
      <dd><table><tr><td><pre class="variable">
<code class="variable-group">[</code><code class="variable-group">(</code><code class="variable-quote">'</code><code class="variable-string">Num</code><code class="variable-quote">'</code><code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-string">3i4</code><code class="variable-quote">'</code><code class="variable-group">)</code><code class="variable-op">,</code>
 <code class="variable-group">(</code><code class="variable-quote">'</code><code class="variable-string">PixelType</code><code class="variable-quote">'</code><code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-string">1i4</code><code class="variable-quote">'</code><code class="variable-group">)</code><code class="variable-op">,</code>
 <code class="variable-group">(</code><code class="variable-quote">'</code><code class="variable-string">mst</code><code class="variable-quote">'</code><code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-string">3i4</code><code class="variable-quote">'</code><code class="variable-group">)</code><code class="variable-op">,</code>
 <code class="variable-group">(</code><code class="variable-quote">'</code><code class="variable-string">m</code><code class="variable-quote">'</code><code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-string">3i4</code><code class="variable-quote">'</code><code class="variable-group">)</code><code class="variable-op">,</code>
 <code class="variable-group">(</code><code class="variable-quote">'</code><code class="variable-string">d</code><code class="variable-quote">'</code><code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-string">3f4</code><code class="variable-quote">'</code><code class="variable-group">)</code><code class="variable-op">,</code>
 <code class="variable-group">(</code><code class="variable-quote">'</code><code class="variable-string">angle</code><code class="variable-quote">'</code><code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-string">3f4</code><code class="variable-quote">'</code><code class="variable-group">)</code><code class="variable-op">,</code>
 <code class="variable-group">(</code><code class="variable-quote">'</code><code class="variable-string">axis</code><code class="variable-quote">'</code><code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-string">3i4</code><code class="variable-quote">'</code><code class="variable-group">)</code><code class="variable-op">,</code>
 <code class="variable-group">(</code><code class="variable-quote">'</code><code class="variable-string">mmm1</code><code class="variable-quote">'</code><code class="variable-op">, </code><code class="variable-quote">'</code><code class="variable-string">3f4</code><code class="variable-quote">'</code><code class="variable-group">)</code><code class="variable-op">,</code>
<code class="variable-ellipsis">...</code>
</pre></td></tr></table>
</dd>
  </dl>
</td></tr></table>
</div>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="Priithon-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://code.google.com/p/priithon">Priithon</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0.1 on Mon Nov 22 14:59:32 2010
    </td>
    <td align="right" class="footer">
      <a target="mainFrame" href="http://epydoc.sourceforge.net"
        >http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie();
  // -->
</script>
</body>
</html>
